import snippets from './snippets';
import { ImgSelectSetter } from './ImgSelect';
import { SelectSetter } from '../_setters';

export default {
  npm: {
    "package": "ui-material",
    "version": "0.1.0",
    "exportName": "FormContainerSet",
    "main": "src/index.tsx",
    "destructuring": true,
    "subName": ""
  },
  hidden: true,
  devMode: 'proCode',
  group: '基础组件',
  category: '基础字段',
  priority: 99,
  snippets,
  componentName: 'FormContainerSet',
  title: '表单标题组件',
  props: [
    // {
    //     name: 'title',
    //     title: {
    //         label: '表单应用名称',
    //         tip: '表单应用名称',
    //     },
    //     display: 'block',
    //     setter: 'StringSetter',
    //     supportVariable: true
    // },
    // {
    //     name: 'describe',
    //     title: {
    //         label: '表单应用描述',
    //         tip: '表单应用描述',
    //     },
    //     display: 'block',
    //     setter: 'StringSetter',
    //     supportVariable: true
    // },
    {
      name: 'codeType',
      title: {
        label: '编号格式',
        tip: '不同的业务需要不同的编号规则，发起申请后系统将根据设置好的规则自动生产编号，无需手动填写。',
      },
      display: 'block',
      setter: [
        {
          componentName: SelectSetter,
          props: {
            options: [
              {
                title: '系统默认',
                value: '系统默认',
              },
              {
                title: '自定义',
                value: '自定义',
              },
            ],
          },
        },
      ],
      supportVariable: true,
    },
    // {
    //     name: 'fileList',
    //     title: {
    //         label: '附件',
    //         tip: '附件上传列表',
    //     },
    //     display: 'block',
    //     setter: 'JsonSetter',
    //     supportVariable: true
    // },
    {
      name: 'formTheme',
      title: { label: '表单样式', tip: '表单主题样式' },
      display: 'block',
      setter: {
        componentName: ImgSelectSetter,
        props: {
          items: [
            {
              title: '默认',
              url: '/lowcode/fields/defaultTheme.png',
              mainColor: 'rgb(255, 255, 255)',
            },
            {
              title: '热情',
              url: '/lowcode/fields/theme1.png',
              mainColor: 'rgb(226, 142, 96)',
            },
            {
              title: '自然',
              url: '/lowcode/fields/theme2.png',
              mainColor: 'rgb(89, 129, 165)',
            },
            {
              title: '冰山',
              url: '/lowcode/fields/theme3.png',
              mainColor: 'rgb(246, 225, 244)',
            },
          ],
        },
      },
    },
  ],
  configure: {
    component: {
      disableBehaviors: ['remove', 'copy'],
      isMinimalRenderUnit: true,
      isContainer: true,
      nestingRule: {
        childWhitelist: ['FormContainer', 'Button'],
        parentWhitelist: [],
      },
    },
    supports: { style: true },
  },
};
